import request from '@/utils/request'
export const getCompanyDepartment = () => {
  return request({
    method: 'GET',
    url: '/company/department'
  })
}

// 获取部门负责人列表
export const getSysUserSimple = () => {
  return request({
    method: 'GET',
    url: '/sys/user/simple'
  })
}

// 添加部门
export const postCompanyDepartment = (data) => {
  return request({
    method: 'POST',
    url: '/company/department',
    data
  })
}

// 获取部门详情
export const getCompanyDepartmentId = id => {
  return request({
    method: 'GET',
    url: `/company/department/${id}`
  })
}

// 删除部门
export const delCompanyDepartment = id => {
  return request({
    method: 'DELETE',
    url: `/company/department/${id}`
  })
}

// 修改部门
export const putDepartment = (data) => {
  return request({
    method: 'PUT',
    url: `/company/department/${data.id}`,
    data
  })
}

